<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>

<blockquote class="layui-elem-quote"><{$action}></blockquote>

<form class="layui-form layui-form-pane" method="post" action="/privilege/save">
	<input type="hidden" name="id" value="<{$privilege_info->id|default:"0"}>">

	<div class="layui-form-item">
		<label class="layui-form-label">菜单名称</label>
		<div class="layui-input-block">
            <input type="text" class="layui-input" name="menu_title" lay-verify="required" value="<{$privilege_info->menu_title|default:""}>" >
		</div>
	</div>

	<div class="layui-form-item">
    	<label class="layui-form-label">菜单链接</label>
        <div class="layui-input-block">
      		<input type="text" class="layui-input" name="menu_url" lay-verify="required"  value="<{$privilege_info->menu_url|default:""}>">
        </div>
  	</div>

  	<div class="layui-form-item">
    	<label class="layui-form-label">父级菜单</label>
        <div class="layui-input-block">
      		<{assign var="pid" value=$privilege_info->pid|default:"0"}>
            <select name="pid">
          		<option value="0">顶级菜单</option>
              	<{foreach from=$privilege_list item=item}>
            	<option value="<{$item->id}>" <{if $item->id == $pid}>selected="selected"<{/if}>><{$item->menu_title}></option>
              	<{/foreach}>
          	</select>
        </div>
  	</div>

  	<div class="layui-form-item">
    	<label class="layui-form-label">所属项目</label>
        <div class="layui-input-block">
      		<{assign var="web_id" value=$privilege_info->web_id|default:"0"}>
        	<select name="web_id">
              	<option value="0">默认项目</option>
              	<{foreach from=$web_project_list item=item}>
                	<option value="<{$item.id}>" <{if $item.id == $web_id}>selected="selected"<{/if}>><{$item.name}></option>
              	<{/foreach}>
          	</select>
        </div>
  	</div>

  	<div class="layui-form-item">
    	<label class="layui-form-label">控制器</label>
        <div class="layui-input-block">
      		<input type="text" class="layui-input" name="action" lay-verify="required"  value="<{$privilege_info->action|default:""}>">
        </div>
  	</div>

  	<div class="layui-form-item">
    	<label class="layui-form-label">菜单排序</label>
        <div class="layui-input-block">
      		<input type="text" class="layui-input" name="sort" lay-verify="required"  value="<{$privilege_info->sort|default:""}>">
        </div>
  	</div>

  	<div class="layui-form-item">
    	<label class="layui-form-label">是否显示</label>
        <div class="layui-input-block">
        	<{assign var="status" value=$privilege_info->status|default:"1"}>
      			<input type="checkbox" <{if $status == 1}> checked<{/if}> name="status" lay-skin="switch" lay-filter="switchTest" value="1" >

        </div>
  	</div>

	<div class="layui-input-block">
  		<button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
		<button type="reset" class="layui-btn layui-btn-primary">重置</button>
	</div>
</form>

<{include file="public_html/footer.html"}>